<?php
require_once 'PHPUnit/Framework.php';
require_once '../cn/solor/dig/class.DiggerCacheMysql.php';

class DiggerCacheMysqlTest extends PHPUnit_Framework_TestCase
{
    public function setUp()
    {

    }

    public function tearDown()
    {

    }

    function testCacheAndDig()
    {
        $url = "http://rainx.cn/test.html";
        $res = array("http://rainx.cn/test.avi",
            "http://somurl.com.cn/sdfdsfs.tmp");
        $cacher = new DiggerCacheMysql();
        $cacher->cache($url, $res);
        $result = $cacher->dig($url);
        $this->assertEquals($res, $result);
    }
}
?>
